/*
 *  Creature.cpp
 *  
 *
 *  Created by Daniel Condon on 25/07/12.
 *  Copyright 2012 __MyCompanyName__. All rights reserved.
 *
 */

#include "Creature.h"

Creature::Creature(){
	Pmig = 0.2f;
	Psdd = 0.5f;
	Pldd = 1 - Psdd;
	growthRate = 1.2f;
}

/*--This function sets the probabilities of migration, long/short distance dispersals
 Params:
 Parameter(0) : Probability of a migration
 Parameter(1) : Probability of a short distance dispersal
 NOTE : Probability of a long distance dispersal = 1 - Psdd
 */
Creature::Creature(double mig, double sdd){
	Pmig = mig;
	Psdd = sdd;
	Pldd = 1 - Psdd;
	growthRate = 1.2f;
}

/*--This function returns the probability of a migration
 Pre : Pmig is not NULL
 Returns : probability of a migration
 */
double Creature::getPmig(){
	return Pmig;
}

/*--This function returns the probability of a short distance dispersal
 Pre : Psdd is not NULL
 Returns : probability of a short distance dispersal
 */

double Creature::getPsdd(){
	return Psdd;
}

/*--This function returns the probability of a long distance dispersal
 Pre : Pldd is not NULL
 Returns : probability of a long distance dispersal
 */
double Creature::getPldd(){
	return Pldd;
}

/*--This function returns the growth rate of specific creature
 Pre : growthRate is not NULL
 Returns : growth rate of specific creature
 */
double Creature::getGrowth(){
	return growthRate;
}